package com.aisino.inveli.vinda.utils;

import java.io.File;
import java.io.FileFilter;

/**
 * @author leifeng
 * @Date 2017-11-14
 **/
public class TxtFileFilter implements FileFilter {

    private String filterKey = ".txt";

    @Override
    public boolean accept(File file) {
        if(file.isDirectory()){
            return false;
        }
        else
        {
            String name = file.getName();
            if(name.endsWith(filterKey)){
                return true;
            } else {
                return false;
            }
        }
    }
}
